package cn.iocoder.yudao.module.book.controller.app.community.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "APP - 动态评论响应 VO")
@Data
public class PostCommentRespVO {

    @Schema(description = "评论ID", example = "1")
    private Long commentId;

    @Schema(description = "用户ID", example = "456")
    private Integer userId;

    @Schema(description = "用户昵称", example = "小红")
    private String username;

    @Schema(description = "用户头像", example = "http://example.com/avatar.jpg")
    private String avatar;

    @Schema(description = "评论内容", example = "很棒的分享！")
    private String content;

    @Schema(description = "点赞数", example = "3")
    private Integer likesCount;

    @Schema(description = "是否已点赞", example = "false")
    private Boolean isLiked;

    @Schema(description = "父评论ID", example = "1")
    private Long parentId;

    @Schema(description = "回复的用户ID", example = "456")
    private Integer replyToUserId;

    @Schema(description = "回复的用户昵称", example = "小明")
    private String replyToUsername;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "回复列表")
    private List<PostCommentRespVO> replies;

}
